'''
Created on Jun 27, 2011

@author: thomaseisner
'''

import csv
import CarFuelType

def load_fuel_type(file):
    csvFile = open(file,"rU")
    dialect = csv.Sniffer.sniff(csvFile.read(1024))
    csvFile.seek(0)
    fileReader = csv.reader(csvFile,dialect)
    tempType = CarFuelType.CarFuelType()
    for row in fileReader:
        tempType.code = row[0]
        tempType.description = row[1]
        tempType.put()
        
    